#ifndef _BASE64_HPP_20120718
#define _BASE64_HPP_20120718

/* Get size_t. */
# include <stddef.h>
#include <string>

/* This uses that the expression (n+(k-1))/k means the smallest
   integer >= n/k, i.e., the ceiling of n/k.  */
# define BASE64_LENGTH(inlen) ((((inlen) + 2) / 3) * 4)

namespace crypto
{
	class Base64
	{
		public :
			static bool encode(const char * in, size_t inlen, std::string & out);

			static bool decode(const char * in, size_t inlen, std::string & out);
	};
};

#endif

